<template>
	<view class="tos">
		<view @tap="tos">
			<slot></slot>
		</view>
	</view>
</template>

<script>
	export default {
		name:"to",
		data() {
			return {
				
			};
		},
		props:['to','type','num','query','fun'],
		methods:{
			tos(){
				if(this.fun) this.fun();
				console.log({
					url:this.to?this.to:'',
					type:this.type?this.type:'navigateTo',
					delta:this.num?this.num:1,
					params:this.query?this.query:{}
				})
				this.$u.route({
					url:this.to?this.to:'',
					type:this.type?this.type:'navigateTo',
					delta:this.num?this.num:1,
					params:this.query?this.query:{}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
.tos{
	display:inline-block ;
}
</style>
